
import httpService from './httpService';
import './api/user';

function appLogin(params) {
  return httpService.post(`/user/wechat_applet_login`, params)
}
function getUserPhone(params) {
  return httpService.post(`/user/get_user_phone`, params)
}
function bindUserPhone(params) {
  return httpService.post(`/user/bind_user_phone`, params)
}
function getUserDetail() {
  return httpService.get(`/user/get/detail`)
}
function getOrgInfo() {
  return httpService.get(`/common/get/org_info`)
}
function queryInvest(params?: object) {
  return httpService.get(`/fund_share/query/invest`, params)
}
function getFundDetail(params = {}) {
  return httpService.get(`/fund/get/detail_complete`, params)
}
function getFundNetHistory(params = {}) {
  return httpService.get(`/fund_net/history/query`, params)
}
function getFundNet(params = {}) {
  return httpService.get(`/fund_net/limit/query`, params)
}
function queryFundNotice(params = {}) {
  return httpService.get(`/fund/query/notice`, params)
}
function queryFundNetMetrics(params = {}) {
  return httpService.get(`/fund_net/metrics/query`, params)
}
function getInvestFromFundShare(params = {}) {
  return httpService.get(`/fund_share/get/invest`, params)
}
function getEligibleApproval(params = {}) {
  return httpService.get(`/compli/get/mark_info/eligible_approval`, params)
}
function getInvestorClass(params = {}) {
  return httpService.get(`/compli/get/mark_info/investor_class`, params)
}
function getApproElectronVisit(params = {}) {
  return httpService.get(`/compli/get/mark_info/appro_electron_visit`, params)
}
function getRiskLevelChange(params = {}) {
  return httpService.get(`/compli/get/mark_info/risk_level_change`, params)
}
function queryMarkInfo(params = {}) {
  return httpService.get(`/compli/query/mark_info`, params)
}
function getRiskAssessment() {
  return httpService.get(`/user/get/risk_assessment`)
}
function getRisk() {
  return httpService.get(`/user/get/risk`)
}
function productHomeList() {
  return httpService.get(`/fund/query/compli`)
}
function misFundAuth() {
  return httpService.post(`/compli/create/mis_fund_auth`)
}
function activemMisFundAuth() {
  return httpService.get(`/compli/active/mis_fund_auth`)
}
function getPersonalCertiInfo() {
  return httpService.get(`/user/get/personal_certi_info`);
}
function getMarkInfoByApproElectronVisit() {
  return httpService.get(`/compli/get/mark_info/appro_electron_visit`);  /// 获取适当性确认留痕

}
function getMarkInfoByRiskApproval(params = {}) {
  return httpService.get(`/compli/get/mark_info/risk_approval`, params);  /// 获取风险变更审核留痕

}
function refreshToken() {
  return httpService.get(`/user/get/new_token`);  /// 获取新token

}



function daoyiAppletLogin(params = {}) { //道以星球登录
  return httpService.post(`/user/daoyi_applet_login`, params);
}
function queryFundList(params = {}) { //查询私募基金
  return httpService.get(`/amac/query/fund`, params);
}

function queryPersonalList(params = {}) { //查询人员信息
  return httpService.get(`/amac/query/personal`, params);
}
function queryManagerList(params = {}) { //查询管理人信息
  return httpService.get(`/amac/query/manager`, params);
}
function queryNewList(params?: {}) { //查询资讯列表
  return httpService.get(`/news/query`, params);
}
function queryNewDetail(params = {}) { //查询资讯详情
  return httpService.get(`/news/get_detail`, params);
}
function getHomePage() { //获取首页接口
  return httpService.get(`/org/get/homepage`);
}

function getCode() { //查询用户邀请码
  return httpService.get(`/invest_invite/get/code`);
}
function queryInviteFriendsList() { //查询邀请关系
  return httpService.get(`/invest_invite/query/list`);
}

function observationPoolHomeList(params = {}) { //观察池首页 查询观察池
  return httpService.get(`/observation_pool/query`, params);
}
function observationPoolList() { //查询观察池报告
  return httpService.get(`/observation_pool/report/query`);
}
function observationPoolDetail(params = {}) { //查询观察池报告
  return httpService.get(`/observation_pool/report_detail/get`, params);
}

function createAuth(params = {}) { //创建实名认证
  return httpService.post(`/user/personal/creti_auth_v2`, params);
}
function cligibleCommitment() { //提交合格投资者承诺
  return httpService.post(`/user/submit/cligible_commitment`);
}

export {
  appLogin, //登录获取用户信息
  getUserPhone, //获取用户手机号
  bindUserPhone,//绑定手机号
  getUserDetail,//获取用户详情
  getOrgInfo,//查询机构详情
  queryInvest,//查询投资人持仓份额
  getFundDetail,//产品详情
  getFundNetHistory,//历史净值
  getFundNet,//业绩走势
  queryFundNotice,// 查询产品公告
  queryFundNetMetrics,//查询产品指标
  getInvestFromFundShare,// 获取投资人持仓份额
  getEligibleApproval,//获取合格投资者确认留痕
  getInvestorClass,//获取投资者类型转化留痕
  getApproElectronVisit,//获取适当性确认留痕
  getRiskLevelChange,//获取产品风险级别调整留痕
  queryMarkInfo,//获取用户留痕信息types=查询类型，以逗号分隔 默认为空查询全部，示例： 1,2,367&query_status=789&day_num=136
  getRiskAssessment,//获取风险测评结果
  getRisk,//获取投资人合规风控信息
  productHomeList, //产品首页列表
  misFundAuth,//创建查看不匹配产品授权
  activemMisFundAuth,//获取有效的查看不匹配产品授权
  getPersonalCertiInfo,//获取用户证件详情
  getMarkInfoByApproElectronVisit,//获取适当性确认留痕
  getMarkInfoByRiskApproval,/// 获取风险变更审核留痕
  refreshToken,//获取新token


  daoyiAppletLogin,//道以星球登录
  queryFundList,//查询私募基金
  queryPersonalList,//查询人员信息
  queryManagerList,//查询管理人信息
  queryNewList,//查询资讯列表
  queryNewDetail,//查询资讯详情
  getHomePage,//获取首页接口

  getCode,//查询用户邀请码
  queryInviteFriendsList,//查询邀请关系

  observationPoolHomeList,//观察池首页 查询观察池
  observationPoolList,//查询观察池报告
  observationPoolDetail,//查询观察池报告详情

  createAuth,//创建实名认证
  cligibleCommitment,//提交合格投资者承诺

}
